//角色管理模块的的接口
import request from '@/utils/request'

//枚举地址
enum API {
  ROLE_LIST = '/role/list',
  ROLE_EDIT = '/role/edit',
  ROLE_ADD = '/role/add',
  ROLE_DELETE = '/role/delete',
  ROLE_MENU_ADD = '/role/menu/add',
}

// 修改角色
export const reqRoleMenuAdd = (data) => {
  return request.post(API.ROLE_MENU_ADD, data)
}

// 角色列表
export const reqRoleList = (params) => {
  return request.get(API.ROLE_LIST, { params })
}

// 修改角色
export const reqRoleEdit = (data) => {
  return request.post(API.ROLE_EDIT, data)
}

// 新增角色
export const reqRoleAdd = (data) => {
  return request.post(API.ROLE_ADD, data)
}

// 新增角色
export const reqRoleDelete = (params) => {
  return request.get(API.ROLE_DELETE, {params})
}